#include "geolayer.h"

geoLayer::geoLayer()
{

}

void geoLayer::mapProjection(projection *proj)
{
    for(auto &object:geoObjects)
    {
        if(object->type=="MultiLineString")
        {
            for(auto &line:dynamic_cast<geoMultiLineString*>(object)->lineStrings)
            {
                line->mapProjection(proj);
            }
        }
        else if(object->type=="MultiPolygon")
        {
            for(auto &polygon:dynamic_cast<geoMultiPolygon*>(object)->polygons)
            {
                polygon->mapProjection(proj);
            }
        }
        else
        {
            object->mapProjection(proj);
        }
    }
}
